*******************************************
********** Results Tables *****************
*******************************************

*******************************************************
*** Description of important variables used: 
* m - fuel input in logs 
* tr95_ti_eff - ETS intensity (heat reates trimmed: 0.025 - 0.0975)
* tr95_fp_eff - Fuel price intensity (heat reates trimmed: 0.025 - 0.0975)
* y - output in logs
* jahr - year 
* dn_y_competitor_mo_ee - inframarginal output for plant in logs
* tr95_z - ETS ex ante exposure
* tr95_fp_eff_z - Fuel price ex ante exposure
* l - Labor input in logs 
* wage - Average wage in logs 
* k - Bottleneck capacity in logs 
* tr95_ti_eff_exp - Expected ETS intensity based on future prices in the previous year
* tr95_z_exp - Expected ETS ex ante exposure based on future prices in the previous year
* tr95_z_fut - ETS ex ante exposure based on future prices 
* tr95_ti_eff_fut - ETS intensity based on future prices
* EF1101U2_TypA_mean - Bottleneck capacity of conventional units
* nyear - Number of reporting years of plant
* EF1101U1_TypA_mean - Number of conventional generating units of plant 
* inv_mach - Investments in machinery in logs
* inv_mach_large - Indicator variable for "large" investments in machinery (as defined in the paper)
* dn_cf_gr_elec_mon - Gross capacity factor
* tr95_ti_eff_size_1-tr95_ti_eff_size_3 -  (reference category excluded)  
* tr95_ti_eff_age_1-tr95_ti_eff_age_3 - (reference category excluded) 
* tr95_ti_eff_fuel_2-tr95_ti_eff_fuel_3 - (reference category excluded)
* tr95_z_size_1-tr95_z_size_3 - (reference category excluded)
* tr95_z_age_1-tr95_z_age_3 - (reference category excluded)
* tr95_z_fuel_2-tr95_z_fuel_3 - (reference category excluded)
*** 
*******************************************************


sort bnr jahr
**** Table 1: Fuel input demand - Average effects ****
* dataset based on untransformed observations in column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)
generate in_model4_fuel = e(sample)

* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing 
preserve
replace tr95_z = . if tr95_ti_eff == .

* Column 1: 
capture noisily eststo col1: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Untransformed number of observations for Column 1:
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2: 
capture noisily eststo col2: xi: xtivreg2 m i.jahr tr95_z tr95_fp_eff_z (y = dn_y_competitor_mo_ee) if in_model4_fuel == 1 & tr95_ti_eff <., fe cluster(bnr) first
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Transformed number of observations for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) nolevel robust orthogonal twostep 
capture noisily di e(N)
* Untransformed number of observations for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) robust orthogonal twostep 
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Untransformed number of observations for Column 3:
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4:
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_ti_eff = tr95_fp_eff
capture noisily test y = 1
* Untransformed number of observations for Column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 5:
capture noisily eststo col5: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test y = 1
* Untransformed number of observations for Column 5:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)


* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff y) order(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff y) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore


**** Table 2: Labor input demand - Average effects ****
* dataset based on observations in column 4:
capture noisily quietly xi: xtabond2 l wage k tr95_ti_eff_exp y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp i.jahr) robust orthogonal twostep
capture noisily di e(N)
replace in_model4 = e(sample)

* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing
preserve 
replace tr95_z_exp = . if tr95_ti_eff_exp == .

* Column 1:
capture noisily eststo col1: xi: xtabond2 l wage k tr95_z_exp y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(wage k tr95_z_exp i.jahr) nolevel robust orthogonal twostep
* Report number of observations for untransformed data in column 1
capture noisily quietly xi: xtabond2 l wage k tr95_z_exp y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(wage k tr95_z_exp i.jahr) robust orthogonal twostep
capture noisily di e(N) 

* Column 2:
capture noisily eststo col2: xi: xtivreg2 l wage k i.jahr tr95_z_exp (y = dn_y_competitor_mo_ee) if in_model4 == 1 & tr95_ti_eff <., fe cluster(bnr) first
* Report number of observations for untransformed data in column 2
capture noisily quietly xi: xtabond2 l wage k i.jahr tr95_z_exp y if in_model4 == 1 & tr95_ti_eff <., gmm() iv(wage k i.jahr tr95_z_exp dn_y_competitor_mo_ee) robust orthogonal twostep
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 l wage k tr95_z_exp y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp i.jahr) nolevel robust orthogonal twostep
* Report number of observations for untransformed data in column 3
capture noisily quietly xi: xtabond2 l wage k tr95_z_exp y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4:
capture noisily eststo col4: xi: xtabond2 l wage k tr95_ti_eff_exp y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp i.jahr) nolevel robust orthogonal twostep
* Report number of observations for untransformed data set and generate sample for labor demand sample robustness check
capture noisily quietly xi: xtabond2 l wage k tr95_ti_eff_exp y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp i.jahr) robust orthogonal twostep
capture noisily di e(N)


* Print summary
capture noisily estout col*, keep(tr95_z_exp tr95_ti_eff_exp y k wage) order(tr95_z_exp tr95_ti_eff_exp y k wage) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore


**** Table 3.1: Fuel input demand - Robustness check: Forward prices ****
* dataset based on untransformed observations in column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff_fut tr95_fp_eff y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z_fut tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)
replace in_model4_fuel = e(sample)

* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing 
preserve
replace tr95_z_fut = . if tr95_ti_eff_fut == .


* Column 1:
capture noisily eststo col1: xi: xtabond2 m tr95_z_fut tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z_fut tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 1: 
capture noisily quietly xi: xtabond2 m tr95_z_fut tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z_fut tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2:
capture noisily eststo col2: xi: xtivreg2 m i.jahr tr95_z_fut tr95_fp_eff_z (y = dn_y_competitor_mo_ee) if in_model4_fuel == 1 & tr95_ti_eff <., fe cluster(bnr) first
* Transformed data for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z_fut tr95_fp_eff_z y if in_model4_fuel == 1 & tr95_ti_eff <., gmm() iv(dn_y_competitor_mo_ee i.jahr tr95_z_fut tr95_fp_eff_z) nolevel robust orthogonal twostep
capture noisily di e(N)
* Untransformed data for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z_fut tr95_fp_eff_z y if in_model4_fuel == 1 & tr95_ti_eff <., gmm() iv(dn_y_competitor_mo_ee i.jahr tr95_z_fut tr95_fp_eff_z) robust orthogonal twostep
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 m tr95_z_fut tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z_fut tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 3: 
capture noisily quietly xi: xtabond2 m tr95_z_fut tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z_fut tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)


* Column 4:
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff_fut tr95_fp_eff y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z_fut tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 4: 
capture noisily quietly xi: xtabond2 m tr95_ti_eff_fut tr95_fp_eff y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z_fut tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 5:
capture noisily eststo col5: xi: xtabond2 m tr95_ti_eff_fut tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z_fut tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 5: 
capture noisily quietly xi: xtabond2 m tr95_ti_eff_fut tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z_fut tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Print summary
capture noisily estout col*, keep(tr95_z_fut tr95_ti_eff_fut) order(tr95_z_fut tr95_ti_eff_fut) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore


**** Table 3.2: Fuel input demand - Robustness check: Labor demand sample ****

*** Data set restricted to observations in column 4 of labor efficiency estimation
* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing 
preserve
replace m = . if l == . | wage == . | k == . | tr95_ti_eff_exp == . | tr95_z_exp == .

* Column 1:
capture noisily eststo col1: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 1
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2:
capture noisily eststo col2: xi: xtivreg2 m i.jahr tr95_z tr95_fp_eff_z (y = dn_y_competitor_mo_ee) if in_model4 == 1 & tr95_ti_eff <., fe cluster(bnr) first
* Transformed data for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4 == 1 & tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) nolevel robust orthogonal twostep
capture noisily di e(N)
* Untransformed data for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4 == 1 & tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) robust orthogonal twostep
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 3
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4:
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 4
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
di e(N)

* Column 5:
capture noisily eststo col5: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 5
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4 == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
di e(N)

* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff) order(tr95_z tr95_ti_eff) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore

**** Table 3.3: Fuel input demand - Robustness check: Sample until 2010 ****

* dataset based on untransformed observations in column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if jahr < 2010 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)
replace in_model4_fuel = e(sample)

* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing 
preserve
replace tr95_z = . if tr95_ti_eff == .

* Column 1:
capture noisily eststo col1: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 1
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2:
capture noisily eststo col2: xi: xtivreg2 m tr95_z tr95_fp_eff_z i.jahr (y = dn_y_competitor_mo_ee) if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., fe cluster(bnr) first
* Transformed data for Column 2:
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z i.jahr y if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., iv(tr95_z tr95_fp_eff_z i.jahr dn_y_competitor_mo_ee) nolevel robust orthogonal twostep
capture noisily di e(N)
* Untransformed data for Column 2:
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z i.jahr y if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., iv(tr95_z tr95_fp_eff_z i.jahr dn_y_competitor_mo_ee) robust orthogonal twostep
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 3
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4:
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 4
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 5:
capture noisily eststo col5: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 5
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & jahr < 2010 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff) order(tr95_z tr95_ti_eff) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore


**** Table 3.4: Fuel input demand - Robustness check: Plants >20 MW ****

* dataset based on untransformed observations in column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if EF1101U2_TypA_mean > 20 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)
replace in_model4_fuel = e(sample)

* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing 
preserve
replace tr95_z = . if tr95_ti_eff == .


* Column 1:
capture noisily eststo col1: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 1
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2:
capture noisily eststo col2: xi: xtivreg2 m i.jahr tr95_z tr95_fp_eff_z (y = dn_y_competitor_mo_ee) if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., fe cluster(bnr) first
* Transformed data for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) nolevel robust orthogonal twostep
capture noisily di e(N)
* Untransformed data for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) robust orthogonal twostep
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 3
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4:
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 4
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 5:
capture noisily eststo col5: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 5
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U2_TypA_mean > 20 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff) order(tr95_z tr95_ti_eff) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore


**** Table 3.5: Fuel input demand - Robustness check: Balanced sample ****

* dataset based on untransformed observations in column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if nyear == 10 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)
replace in_model4_fuel = e(sample)

* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing 
preserve
replace tr95_z = . if tr95_ti_eff == .


* Column 1:
capture noisily eststo col1: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 1
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2:
capture noisily eststo col2: xi: xtivreg2 m i.jahr tr95_z tr95_fp_eff_z (y = dn_y_competitor_mo_ee) if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., fe cluster(bnr) first
* Transformed data for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) nolevel robust orthogonal twostep
capture noisily di e(N)
* Untransformed data for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) robust orthogonal twostep
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 3
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4:
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 4
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 5:
capture noisily eststo col5: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 5
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & nyear == 10 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff) order(tr95_z tr95_ti_eff) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore


**** Table 3.6: Fuel input demand - Robustness check: Single unit plants ****

* dataset based on untransformed observations in column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if EF1101U1_TypA_mean == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)
replace in_model4_fuel = e(sample)

* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing
preserve
replace tr95_z = . if tr95_ti_eff == .


* Column 1:
capture noisily eststo col1: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 1
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2:
capture noisily eststo col2: xi: xtivreg2 m i.jahr tr95_z tr95_fp_eff_z (y = dn_y_competitor_mo_ee) if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., fe cluster(bnr) first
* Transformed data for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) nolevel robust orthogonal twostep
capture noisily di e(N)
* Untransformed data for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) robust orthogonal twostep
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 3
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4:
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 4
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 5:
capture noisily eststo col5: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 5
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & EF1101U1_TypA_mean == 1 & tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff) order(tr95_z tr95_ti_eff) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore


**** Table 4: Investment in machinery - Average effects ****
* Column 1: xtivreg2 to have consistency in reporting
capture noisily eststo col1: xi: xtivreg2 inv_mach i.jahr tr95_z tr95_fp_eff_z if tr95_ti_eff <., fe cluster(bnr)
capture noisily test tr95_z = tr95_fp_eff_z
* Untransformed data
capture noisily quietly xi: xtreg inv_mach i.jahr tr95_z tr95_fp_eff_z if tr95_ti_eff <., fe cluster(bnr)
capture noisily di e(N)


* Column 2:
capture noisily eststo col2: xi: xtivreg2 inv_mach i.jahr (tr95_ti_eff tr95_fp_eff = tr95_z tr95_fp_eff_z) if tr95_ti_eff <., fe cluster(bnr) first
capture noisily test tr95_ti_eff = tr95_fp_eff
* Untransformed data
capture noisily quietly xi: xtabond2 inv_mach i.jahr tr95_ti_eff tr95_fp_eff if tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z) robust orthogonal twostep
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtivreg2 inv_mach i.jahr tr95_fp_eff_z (tr95_ti_eff = tr95_z) if tr95_ti_eff <., fe cluster(bnr) first
* Untransformed data
capture noisily quietly xi: xtabond2 inv_mach i.jahr tr95_ti_eff tr95_fp_eff_z if tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z) robust orthogonal twostep
capture noisily di e(N)


* Column 4: xtivreg2 to have consistency in reporting
capture noisily eststo col4: xi: xtivreg2 inv_mach_large i.jahr tr95_z tr95_fp_eff_z if tr95_ti_eff <., fe cluster(bnr)
capture noisily test tr95_z = tr95_fp_eff_z
* Untransformed data
capture noisily quietly xi: xtreg inv_mach_large i.jahr tr95_z tr95_fp_eff_z if tr95_ti_eff <., fe cluster(bnr)
capture noisily di e(N)

* Column 5:
capture noisily eststo col5: xi: xtivreg2 inv_mach_large i.jahr (tr95_ti_eff tr95_fp_eff = tr95_z tr95_fp_eff_z) if tr95_ti_eff <., fe cluster(bnr) first
capture noisily test tr95_ti_eff = tr95_fp_eff
* Untransformed data
capture noisily quietly xi: xtabond2 inv_mach_large i.jahr tr95_ti_eff tr95_fp_eff if tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z) robust orthogonal twostep
capture noisily di e(N)


* Column 6:
capture noisily eststo col6: xi: xtivreg2 inv_mach_large i.jahr tr95_fp_eff_z (tr95_ti_eff = tr95_z) if tr95_ti_eff <., fe cluster(bnr) first
* Untransformed data
capture noisily quietly xi: xtabond2 inv_mach_large i.jahr tr95_ti_eff tr95_fp_eff_z if tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z) robust orthogonal twostep
capture noisily di e(N)


* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff) order(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear



**** Table 5: Utilization - Average effects ****
* Column 1: xtivreg2 to have consistency in reporting
capture noisily eststo col1: xi: xtivreg2 dn_cf_gr_elec_mon i.jahr tr95_z tr95_fp_eff_z if tr95_ti_eff <., fe cluster(bnr)
capture noisily test tr95_z = tr95_fp_eff_z
* Untransformed data
capture noisily quietly xi: xtreg dn_cf_gr_elec_mon i.jahr tr95_z tr95_fp_eff_z if tr95_ti_eff <., fe cluster(bnr)
capture noisily di e(N)



* Column 2:
capture noisily eststo col2: xi: xtivreg2 dn_cf_gr_elec_mon i.jahr (tr95_ti_eff tr95_fp_eff = tr95_z tr95_fp_eff_z) if tr95_ti_eff <., fe cluster(bnr) first
capture noisily test tr95_ti_eff = tr95_fp_eff
* Untransformed data
capture noisily quietly xi: xtabond2 dn_cf_gr_elec_mon i.jahr tr95_ti_eff tr95_fp_eff if tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z) robust orthogonal twostep
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtivreg2 dn_cf_gr_elec_mon i.jahr tr95_fp_eff_z (tr95_ti_eff = tr95_z) if tr95_ti_eff <., fe cluster(bnr) first
* Untransformed data
capture noisily quietly xi: xtabond2 dn_cf_gr_elec_mon i.jahr tr95_ti_eff tr95_fp_eff_z if tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z) robust orthogonal twostep
capture noisily di e(N)

* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff) order(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear



**** Table E-1: Fuel input demand - Heterogeneous effects ****
* Column 1:
capture noisily eststo col1: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z tr95_ti_eff_size_1-tr95_ti_eff_size_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z tr95_z_size_1-tr95_z_size_3 i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 1
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z tr95_ti_eff_size_1-tr95_ti_eff_size_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z tr95_z_size_1-tr95_z_size_3 i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2: 
capture noisily eststo col2: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z tr95_ti_eff_age_1-tr95_ti_eff_age_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z tr95_z_age_1-tr95_z_age_3 i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 2
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z tr95_ti_eff_age_1-tr95_ti_eff_age_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z tr95_z_age_1-tr95_z_age_3 i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 3: 
capture noisily eststo col3: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z tr95_ti_eff_fuel_2 tr95_ti_eff_fuel_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z tr95_z_fuel_2 tr95_z_fuel_3 i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 3
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z tr95_ti_eff_fuel_2 tr95_ti_eff_fuel_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z tr95_z_fuel_2 tr95_z_fuel_3 i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4: 
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z tr95_ti_eff_size_1-tr95_ti_eff_size_3 tr95_ti_eff_age_1-tr95_ti_eff_age_3 tr95_ti_eff_fuel_2 tr95_ti_eff_fuel_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z tr95_z_size_1-tr95_z_size_3 tr95_z_age_1-tr95_z_age_3 tr95_z_fuel_2 tr95_z_fuel_3 i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 4
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z tr95_ti_eff_size_1-tr95_ti_eff_size_3 tr95_ti_eff_age_1-tr95_ti_eff_age_3 tr95_ti_eff_fuel_2 tr95_ti_eff_fuel_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z tr95_z_size_1-tr95_z_size_3 tr95_z_age_1-tr95_z_age_3 tr95_z_fuel_2 tr95_z_fuel_3 i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Print summary
capture noisily estout col*, keep(tr95_ti_eff tr95_ti_eff_size_1 tr95_ti_eff_size_2 tr95_ti_eff_size_3 tr95_ti_eff_age_1 tr95_ti_eff_age_2 tr95_ti_eff_age_3 tr95_ti_eff_fuel_2 tr95_ti_eff_fuel_3) order(tr95_ti_eff tr95_ti_eff_size_1 tr95_ti_eff_size_2 tr95_ti_eff_size_3 tr95_ti_eff_age_1 tr95_ti_eff_age_2 tr95_ti_eff_age_3 tr95_ti_eff_fuel_2 tr95_ti_eff_fuel_3) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear


**** Table E-2: Labor input demand - Heterogeneous effects ****
* Column 1:
capture noisily eststo col1: xi: xtabond2 l wage k tr95_ti_eff_exp tr95_ti_eff_exp_size_1-tr95_ti_eff_exp_size_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp tr95_z_exp_size_1-tr95_z_exp_size_3 i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 1
capture noisily quietly xi: xtabond2 l wage k tr95_ti_eff_exp tr95_ti_eff_exp_size_1-tr95_ti_eff_exp_size_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp tr95_z_exp_size_1-tr95_z_exp_size_3 i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2: 
capture noisily eststo col2: xi: xtabond2 l wage k tr95_ti_eff_exp tr95_ti_eff_exp_age_1-tr95_ti_eff_exp_age_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp tr95_z_exp_age_1-tr95_z_exp_age_3 i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 2
capture noisily quietly xi: xtabond2 l wage k tr95_ti_eff_exp tr95_ti_eff_exp_age_1-tr95_ti_eff_exp_age_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp tr95_z_exp_age_1-tr95_z_exp_age_3 i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 3: 
capture noisily eststo col3: xi: xtabond2 l wage k tr95_ti_eff_exp tr95_ti_eff_exp_fuel_2 tr95_ti_eff_exp_fuel_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp tr95_z_exp_fuel_2 tr95_z_exp_fuel_3 i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 3
capture noisily quietly xi: xtabond2 l wage k tr95_ti_eff_exp tr95_ti_eff_exp_fuel_2 tr95_ti_eff_exp_fuel_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp tr95_z_exp_fuel_2 tr95_z_exp_fuel_3 i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4: 
capture noisily eststo col4: xi: xtabond2 l wage k tr95_ti_eff_exp tr95_ti_eff_exp_size_1-tr95_ti_eff_exp_size_3 tr95_ti_eff_exp_age_1-tr95_ti_eff_exp_age_3 tr95_ti_eff_exp_fuel_2 tr95_ti_eff_exp_fuel_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp tr95_z_exp_size_1-tr95_z_exp_size_3 tr95_z_exp_age_1-tr95_z_exp_age_3 tr95_z_exp_fuel_2 tr95_z_exp_fuel_3 i.jahr) nolevel robust orthogonal twostep
* Untransformed number of observations for Column 4
capture noisily quietly xi: xtabond2 l wage k tr95_ti_eff_exp tr95_ti_eff_exp_size_1-tr95_ti_eff_exp_size_3 tr95_ti_eff_exp_age_1-tr95_ti_eff_exp_age_3 tr95_ti_eff_exp_fuel_2 tr95_ti_eff_exp_fuel_3 y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .)) iv(dn_y_competitor_mo_ee wage k tr95_z_exp tr95_z_exp_size_1-tr95_z_exp_size_3 tr95_z_exp_age_1-tr95_z_exp_age_3 tr95_z_exp_fuel_2 tr95_z_exp_fuel_3 i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Print summary
capture noisily estout col*, keep(tr95_ti_eff_exp tr95_ti_eff_exp_size_1 tr95_ti_eff_exp_size_2 tr95_ti_eff_exp_size_3 tr95_ti_eff_exp_age_1 tr95_ti_eff_exp_age_2 tr95_ti_eff_exp_age_3 tr95_ti_eff_exp_fuel_2 tr95_ti_eff_exp_fuel_3) order(tr95_ti_eff_exp tr95_ti_eff_exp_size_1 tr95_ti_eff_exp_size_2 tr95_ti_eff_exp_size_3 tr95_ti_eff_exp_age_1 tr95_ti_eff_exp_age_2 tr95_ti_eff_exp_age_3 tr95_ti_eff_exp_fuel_2 tr95_ti_eff_exp_fuel_3) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear




***** Additional robustness checks: robustness of fuel input equation with respect to lag structure (mentioned in Footnote 28)
* 1) all lags -- collapsed 

* dataset based on untransformed observations in column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if tr95_ti_eff <., gmm(y, lag(2 .) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)
replace in_model4_fuel = e(sample)

* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing (otherwise difficulties because of the forward orthogonal deviations)
preserve
replace tr95_z = . if tr95_ti_eff == .

* Column 1: 
capture noisily eststo col1: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .) collapse) iv(tr95_z fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Untransformed number of observations for Column 1:
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .) collapse) iv(tr95_z fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2: 
capture noisily eststo col2: xi: xtivreg2 m i.jahr tr95_z tr95_fp_eff_z (y = dn_y_competitor_mo_ee) if in_model4_fuel == 1 & tr95_ti_eff <., fe cluster(bnr) first
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Transformed number of observations for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) nolevel robust orthogonal twostep 
capture noisily di e(N)
* Untransformed number of observations for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) robust orthogonal twostep 
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Untransformed number of observations for Column 3:
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4:
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_ti_eff = tr95_fp_eff
capture noisily test y = 1
* Untransformed number of observations for Column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 5:
capture noisily eststo col5: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test y = 1
* Untransformed number of observations for Column 5:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 .) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)


* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff y) order(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff y) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore



* 2) only lag two 

* dataset based on untransformed observations in column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if tr95_ti_eff <., gmm(y, lag(2 2)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)
replace in_model4_fuel = e(sample)

* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing (otherwise difficulties because of the forward orthogonal deviations)
preserve
replace tr95_z = . if tr95_ti_eff == .

* Column 1: 
capture noisily eststo col1: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2)) iv(tr95_z fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Untransformed number of observations for Column 1:
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2)) iv(tr95_z fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2: 
capture noisily eststo col2: xi: xtivreg2 m i.jahr tr95_z tr95_fp_eff_z (y = dn_y_competitor_mo_ee) if in_model4_fuel == 1 & tr95_ti_eff <., fe cluster(bnr) first
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Transformed number of observations for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) nolevel robust orthogonal twostep 
capture noisily di e(N)
* Untransformed number of observations for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) robust orthogonal twostep 
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Untransformed number of observations for Column 3:
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4:
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_ti_eff = tr95_fp_eff
capture noisily test y = 1
* Untransformed number of observations for Column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 5:
capture noisily eststo col5: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test y = 1
* Untransformed number of observations for Column 5:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2)) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)


* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff y) order(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff y) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore


* 2) only lag two - collapsed

* dataset based on untransformed observations in column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if tr95_ti_eff <., gmm(y, lag(2 2) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)
replace in_model4_fuel = e(sample)

* Restrict exact to sample of column 4 by setting ETS EAE to missing if ETS TI is missing (otherwise difficulties because of the forward orthogonal deviations)
preserve
replace tr95_z = . if tr95_ti_eff == .

* Column 1: 
capture noisily eststo col1: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2) collapse) iv(tr95_z fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Untransformed number of observations for Column 1:
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2) collapse) iv(tr95_z fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 2: 
capture noisily eststo col2: xi: xtivreg2 m i.jahr tr95_z tr95_fp_eff_z (y = dn_y_competitor_mo_ee) if in_model4_fuel == 1 & tr95_ti_eff <., fe cluster(bnr) first
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Transformed number of observations for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) nolevel robust orthogonal twostep 
capture noisily di e(N)
* Untransformed number of observations for Column 2:
capture noisily quietly xi: xtabond2 m i.jahr tr95_z tr95_fp_eff_z y if in_model4_fuel == 1 & tr95_ti_eff <., gmm() iv(i.jahr tr95_z tr95_fp_eff_z dn_y_competitor_mo_ee) robust orthogonal twostep 
capture noisily di e(N)

* Column 3:
capture noisily eststo col3: xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_z = tr95_fp_eff_z
capture noisily test y = 1
* Untransformed number of observations for Column 3:
capture noisily quietly xi: xtabond2 m tr95_z tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 4:
capture noisily eststo col4: xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test tr95_ti_eff = tr95_fp_eff
capture noisily test y = 1
* Untransformed number of observations for Column 4:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)

* Column 5:
capture noisily eststo col5: xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) nolevel robust orthogonal twostep
capture noisily test y = 1
* Untransformed number of observations for Column 5:
capture noisily quietly xi: xtabond2 m tr95_ti_eff tr95_fp_eff_z y i.jahr if in_model4_fuel == 1 & tr95_ti_eff <., gmm(y, lag(2 2) collapse) iv(dn_y_competitor_mo_ee tr95_z tr95_fp_eff_z i.jahr) robust orthogonal twostep
capture noisily di e(N)


* Print summary
capture noisily estout col*, keep(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff y) order(tr95_z tr95_ti_eff tr95_fp_eff_z tr95_fp_eff y) starlevels(* 0.1 ** 0.05 *** 0.01) cells(b(star fmt(4)) (se(par fmt(4)))) stats(N, fmt(%9.0gc))
eststo clear

restore





exit
